var _EsdDynamicTransformationFunction = function($){
/**
* 命名空间定义
*/
var _EsdDynamicTransformationScript = {};
_EsdDynamicTransformationScript.navBlock = {}; // 定义区域跳转类
_EsdDynamicTransformationScript.navBlock.selector = {};
/**
* 文本链接 a
*/
//保证所有a标签都有href
$("a").each(function(){

var aHref = this.href;
if( aHref=="" || aHref==undefined ){
$(this).attr("href","javascript:void(0)");
}

//给a标签加title
var aTitle = this.title;
var aText = this.text;

if( aTitle=="" || aTitle==undefined ){
if( aText!="" || aText!=undefined ){
$(this).attr("title",$.trim(aText));
}
}

});


//select下的option添加title
$("option").each(function(){
var oTitle = this.title;
var oText = this.text;
if( oTitle=="" || oTitle==undefined ){
if( oText!="" || oText!=undefined ){
$(this).attr("title",$.trim(oText));
}
}
});


//搜索
$("#keyword").attr("title","请输入搜索内容");
$("#keyword").attr("placeholder","请输入搜索内容");
$("#button").attr("title","搜索");









/**
* 图片处理片段
*/

$('img[src="./images/logo_dfz20181128.png"]').attr('title','吉林省地方志编纂委员会logo图片').attr('alt','吉林省地方志编纂委员会logo图片');
$('img[src="./images/txt_dfz20181128.png"]').attr('title','修志问道以启未来logo图片').attr('alt','修志问道以启未来logo图片');
$('img[src="./xxsjd/images/P020181205519166290159.jpg"]').attr('title','学习贯彻党的十九大精神，推进地方志事业健康协调可持续发展').attr('alt','学习贯彻党的十九大精神，推进地方志事业健康协调可持续发展');
$('img[src="./lxyz/images/P020181205518994467938.jpg"]').attr('title','深入开展两学一做学习教育').attr('alt','深入开展两学一做学习教育');
$('img[src="./images/tit_jgxx_dfz20181128.jpg"]').attr('title','机构信息').attr('alt','机构信息');
$('img[src="./images/tit_xxgkzl_dfz20181128.jpg"]').attr('title','信息公开专栏').attr('alt','信息公开专栏');
$('img[src="./images/tit_zyzcxxzz_dfz20181128.jpg"]').attr('title','重要政策信息转载').attr('alt','重要政策信息转载');
$('img[src="./images/box_more1_dfz20181128.jpg"]').attr('title','更多').attr('alt','更多');
$('img[src="./images/box_more2_dfz20181128.jpg"]').attr('title','更多').attr('alt','更多');
$('img[src="./images/box_more3_dfz20181128.jpg"]').attr('title','更多').attr('alt','更多');
$('img[src="./images/tit_dfzzylxkf_dfz20181128.jpg"]').attr('title','地方志资源立项开发').attr('alt','地方志资源立项开发');
$('img[src="./images/tit_jgdg_dfz20181128.jpg"]').attr('title','今古大观').attr('alt','今古大观');
$('img[src="./images/tit_zjlt_dfz20181128.jpg"]').attr('title','志鉴论坛').attr('alt','志鉴论坛');
$('img[src="./images/tit_hdjl_dfz20181128.jpg"]').attr('title','互动交流').attr('alt','互动交流');
$('img[src="./images/tit_fzg_dfz20181128.jpg"]').attr('title','方志馆').attr('alt','方志馆');
$('img[src="./images/tit_fzsp_dfz20181128.jpg"]').attr('title','方志视频').attr('alt','方志视频');
$('img[src="./images/tit_lssdjt_dfz20181128.jpg"]').attr('title','历史上的今天').attr('alt','历史上的今天');
$('img[src="./images/tit_xsj_dfz20181128.jpg"]').attr('title','新书架').attr('alt','新书架');
$('img[src="./dfzzylxkf/xsj/202002/W020200228578507122522.png"]').attr('title','最闪亮的名片').attr('alt','最闪亮的名片');
$('img[src="./dfzzylxkf/xsj/202002/W020200221423122407952.png"]').attr('title','蔬菜食疗保健及验方').attr('alt','蔬菜食疗保健及验方');
$('img[src="./dfzzylxkf/xsj/202002/W020200221399708847481.png"]').attr('title','德惠记忆').attr('alt','德惠记忆');
$('img[src="./dfzzylxkf/xsj/201910/W020191028800839751167.jpg"]').attr('title','院士在吉林').attr('alt','院士在吉林');
$('img[src="./dfzzylxkf/xsj/201809/W020200221455659175060.jpg"]').attr('title','寻路关东——长白山区移民口述实录').attr('alt','寻路关东——长白山区移民口述实录');
$('img[src="./dfzzylxkf/xsj/201808/W020200221456169419529.jpg"]').attr('title','万宝山事件史料辑录').attr('alt','万宝山事件史料辑录');
$('img[src="./dfzzylxkf/xsj/201808/W020200221456613242049.jpg"]').attr('title','关东大烟袋').attr('alt','关东大烟袋');
$('img[src="./images/xsj_jl_dfz20181128.jpg"]').attr('title','吉林').attr('alt','吉林');
$('img[src="./images/tit_tsjl_dfz20181128.jpg"]').attr('title','图说吉林').attr('alt','图说吉林');
$('img[src="./ybjl/201104/W020181106548906507912.jpg"]').attr('title','冰湖腾鱼（查干湖冬捕景区）').attr('alt','冰湖腾鱼（查干湖冬捕景区）');
$('img[src="./ybjl/201104/W020181106548885696716.jpg"]').attr('title','向海舞鹤(向海湿地)').attr('alt','向海舞鹤(向海湿地)');
$('img[src="./ybjl/201107/W020181106548937958024.jpg"]').attr('title','叶赫那拉古城').attr('alt','叶赫那拉古城');
$('img[src="./ybjl/201107/W020181106548943907610.jpg"]').attr('title','龙虎石刻').attr('alt','龙虎石刻');
$('img[src="./ybjl/201104/W020181106548880590456.jpg"]').attr('title','王城遗韵(高句丽古迹)').attr('alt','王城遗韵(高句丽古迹)');
$('img[src="./ybjl/201104/W020181106548901847222.jpg"]').attr('title','净月神秀(净月潭)').attr('alt','净月神秀(净月潭)');
$('img[src="./ybjl/201104/W020181106548896826834.jpg"]').attr('title','寒江雪柳(吉林雾凇)').attr('alt','寒江雪柳(吉林雾凇)');
$('img[src="./ybjl/201104/W020181106548894396785.jpg"]').attr('title','深宫尘史(伪满皇宫)').attr('alt','深宫尘史(伪满皇宫)');
$('img[src="./ybjl/201104/W020181106548890393643.jpg"]').attr('title','鸡鸣三疆(防川景区)').attr('alt','鸡鸣三疆(防川景区)');
$('img[src="./images/tit_yqlj_dfz20181128.jpg"]').attr('title','友情链接').attr('alt','友情链接');
$('img[src="./qt/lj/gjxglj/201812/W020181224327749538061.jpg"]').attr('title','中国方志网').attr('alt','中国方志网');
$('img[src="./qt/lj/gjxglj/201812/W020181224328115541846.jpg"]').attr('title','中国地情网').attr('alt','中国地情网');
$('img[src="./qt/lj/gjxglj/201812/W020181224328359239601.jpg"]').attr('title','中国国情网').attr('alt','中国国情网');
$('img[src="./qt/lj/gjxglj/201812/W020181224328620015294.jpg"]').attr('title','中国方志出版网').attr('alt','中国方志出版网');
$('img[src="./images/bs2_dfz20181128.jpg"]').attr('title','事业单位').attr('alt','事业单位');
$('img[src="./images/ewm_dfz20181128.jpg"]').attr('title','方志吉林微信公众号').attr('alt','方志吉林微信公众号');

//img
$("img").each(function(){
//给图片加alt/title
var imgAlt = this.alt,
imgTitle = this.title,
imgSrc = this.src,
parentText = this.parentElement.text;

if(this.alt=="" || this.alt==undefined){
if(imgTitle!="" && imgTitle!=undefined){
$(this).attr("alt",imgTitle);
}else if(parentText!="" && parentText!=undefined){
$(this).attr("alt",parentText);
}
}
if(this.title=="" || this.title==undefined){
if(imgAlt!="" && imgAlt!=undefined){
$(this).attr("title",imgAlt);
}else if(parentText!="" && parentText!=undefined){
$(this).attr("title",parentText);
}
}
})

$("img").each(function(){
if( (this.alt=="" && this.title=="")||(this.alt==undefined && this.title==undefined) ){
$(this).attr("title","图片");
$(this).attr("alt","图片");
}
})
/**
* 共通头部
*/
$("iframe:eq(0)").attr("title","天气预报");
/**
* 主导航
*/
/**
* 首页所有幻灯片
*/



// 首页
if(location.href=="http://dfz.jl.gov.cn/" || location.href=="http://dfz.jl.gov.cn/index.html"){


var part_First = function(){

//轮播,右下角原点--鼠标点击触发情况
//轮播：只获取轮播中一个a标签。
//以文字a标签为主，图片a标签尽量不要，title不稳定

//轮播前的标签
_EsdDynamicTransformationScript.esdTagFrontNum1 = $(".nav a:last");

//文字A标签
_EsdDynamicTransformationScript.esdTagANum1 = $("#slideBox .bd ul li:eq(0) .pics_tit a");
_EsdDynamicTransformationScript.esdTagANum2 = $("#slideBox .bd ul li:eq(1) .pics_tit a");
_EsdDynamicTransformationScript.esdTagANum3 = $("#slideBox .bd ul li:eq(2) .pics_tit a");
_EsdDynamicTransformationScript.esdTagANum4 = $("#slideBox .bd ul li:eq(3) .pics_tit a");
_EsdDynamicTransformationScript.esdTagANum5 = $("#slideBox .bd ul li:eq(4) .pics_tit a");
_EsdDynamicTransformationScript.esdTagANum6 = $("#slideBox .bd ul li:eq(5) .pics_tit a");

//原点
_EsdDynamicTransformationScript.esdTagCircleNum1 = $("#slideBox .hd ul li:eq(0)");
_EsdDynamicTransformationScript.esdTagCircleNum2 = $("#slideBox .hd ul li:eq(1)");
_EsdDynamicTransformationScript.esdTagCircleNum3 = $("#slideBox .hd ul li:eq(2)");
_EsdDynamicTransformationScript.esdTagCircleNum4 = $("#slideBox .hd ul li:eq(3)");
_EsdDynamicTransformationScript.esdTagCircleNum5 = $("#slideBox .hd ul li:eq(4)");
_EsdDynamicTransformationScript.esdTagCircleNum6 = $("#slideBox .hd ul li:eq(5)");

//轮播后的标签
_EsdDynamicTransformationScript.esdTagAfterNum1 = $(".slideTxtBox1 a:first");

//轮播前的焦点
_EsdDynamicTransformationScript.esdTagFrontNum1.focus(function (e) {
$(this).bind("keydown.keydown_0", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum1.mouseover();
_EsdDynamicTransformationScript.esdTagANum1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagFrontNum1.blur(function () {
$(this).unbind("keydown.keydown_0");
});

//第一块
_EsdDynamicTransformationScript.esdTagANum1.focus(function (e) {
$(this).bind("keydown.keydown_1", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagFrontNum1.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum2.mouseover();
_EsdDynamicTransformationScript.esdTagANum2.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum1.blur(function () {
$(this).unbind("keydown.keydown_1");
});

//第二块
_EsdDynamicTransformationScript.esdTagANum2.focus(function (e) {
$(this).bind("keydown.keydown_2", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum1.mouseover();
_EsdDynamicTransformationScript.esdTagANum1.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum3.mouseover();
_EsdDynamicTransformationScript.esdTagANum3.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum2.blur(function () {
$(this).unbind("keydown.keydown_2");
});

//第三块
_EsdDynamicTransformationScript.esdTagANum3.focus(function (e) {
$(this).bind("keydown.keydown_3", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum2.mouseover();
_EsdDynamicTransformationScript.esdTagANum2.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum4.mouseover();
_EsdDynamicTransformationScript.esdTagANum4.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum3.blur(function () {
$(this).unbind("keydown.keydown_3");
});

//第四块
_EsdDynamicTransformationScript.esdTagANum4.focus(function (e) {
$(this).bind("keydown.keydown_4", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum3.mouseover();
_EsdDynamicTransformationScript.esdTagANum3.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum5.mouseover();
_EsdDynamicTransformationScript.esdTagANum5.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum4.blur(function () {
$(this).unbind("keydown.keydown_4");
});

//第五块
_EsdDynamicTransformationScript.esdTagANum5.focus(function (e) {
$(this).bind("keydown.keydown_5", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum4.mouseover();
_EsdDynamicTransformationScript.esdTagANum4.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum6.mouseover();
_EsdDynamicTransformationScript.esdTagANum6.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum4.blur(function () {
$(this).unbind("keydown.keydown_5");
});

//第六块
_EsdDynamicTransformationScript.esdTagANum6.focus(function (e) {
$(this).bind("keydown.keydown_6", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum5.mouseover();
_EsdDynamicTransformationScript.esdTagANum5.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagAfterNum1.mouseover();
_EsdDynamicTransformationScript.esdTagAfterNum1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esdTagANum6.blur(function () {
$(this).unbind("keydown.keydown_6");
});

//轮播后的焦点
_EsdDynamicTransformationScript.esdTagAfterNum1.focus(function (e) {
$(this).bind("keydown.keydown_7", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum6.mouseover();
_EsdDynamicTransformationScript.esdTagANum6.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esdTagAfterNum1.blur(function () {
$(this).unbind("keydown.keydown_7");
});

}


}
/**
* 二级页
*/

// -------------------------------二级页------------------------------------
if(location.href=="http://dfz.jl.gov.cn/hdjl/tzxx/" || location.href=="http://dfz.jl.gov.cn/hdjl/zxzx/"){
_EsdDynamicTransformationScript.iframeInputInterval = setInterval(function(){
if(document.getElementsByTagName("iframe")[0].contentWindow.document.getElementsByTagName("input")[0]!=undefined){
clearInterval(_EsdDynamicTransformationScript.iframeInputInterval);

var inputIframe = document.getElementsByTagName("iframe")[0].contentWindow.document;
$(inputIframe).find("#frmData textarea:eq(0)").attr({placeholder:"标题",title:"标题"});
$(inputIframe).find("#frmData textarea:eq(1)").attr({placeholder:"姓名",title:"姓名"});
$(inputIframe).find("#frmData textarea:eq(2)").attr({placeholder:"联系电话",title:"联系电话"});
$(inputIframe).find("#frmData textarea:eq(3)").attr({placeholder: "电子邮件",title:"电子邮件"});
$(inputIframe).find("#frmData textarea:eq(4)").attr({placeholder: "通信地址",title:"通信地址"});

$(inputIframe).find("#SubmitButton").attr({title:"提交",placeholder: "提交"});
$(inputIframe).find("#ResetButton").attr({title:"重置",placeholder: "重置"});

}
}, 500);

}


/**
* 主页js
*/
if (window.location.href == 'http://dfz.jl.gov.cn/' || window.location.href == 'http://dfz.jl.gov.cn/index.htm') {
//首页


// 总计时器，保证目标加载完毕再执行js（轮播+国内动态+国务院[iframe]）
_EsdDynamicTransformationScript.intervalMpa = setInterval(function(){

if( ( $("#slideBox .hd ul li:eq(4)") != undefined )
&& ( $(".slideTxtBox1 .bd > ul:eq(2) a:last") != undefined )
&& ( document.getElementsByTagName("iframe")[1].contentWindow.document.getElementsByTagName("a")[0] != undefined )
&& ( $(".slideTxtBox3 .bd > ul:eq(2) a:last") != undefined ) ){
clearInterval(_EsdDynamicTransformationScript.intervalMpa);

part_First();
part_Second();
part_Third();
part_Forth();

}

}, 500);



var part_Second = function(){

//各个选项名称
_EsdDynamicTransformationScript.esd1TagNum1 = $(".slideTxtBox1 .hd ul a:eq(0)");
_EsdDynamicTransformationScript.esd1TagNum2 = $(".slideTxtBox1 .hd ul a:eq(1)");
_EsdDynamicTransformationScript.esd1TagNum3 = $(".slideTxtBox1 .hd ul a:eq(2)");

//各个选项中的第一个内容
_EsdDynamicTransformationScript.esd1TagNum1Content1 = $(".slideTxtBox1 .bd > ul:eq(0) a:first");
_EsdDynamicTransformationScript.esd1TagNum2Content1 = $(".slideTxtBox1 .bd > ul:eq(1) a:first");
_EsdDynamicTransformationScript.esd1TagNum3Content1 = $(".slideTxtBox1 .bd > ul:eq(2) a:first");

//各个选项中的最后一个内容
_EsdDynamicTransformationScript.esd1TagNum1ContentN = $(".slideTxtBox1 .bd > ul:eq(0) a:last");
_EsdDynamicTransformationScript.esd1TagNum2ContentN = $(".slideTxtBox1 .bd > ul:eq(1) a:last");
_EsdDynamicTransformationScript.esd1TagNum3ContentN = $(".slideTxtBox1 .bd > ul:eq(2) a:last");


//第一块
_EsdDynamicTransformationScript.esd1TagNum1.focus(function (e) {
$(this).bind("keydown.keydown_1", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd1TagNum1Content1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd1TagNum1.blur(function () {
$(this).unbind("keydown.keydown_1");
});

_EsdDynamicTransformationScript.esd1TagNum1Content1.focus(function () {
$(this).bind("keydown.keydown_s1", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esd1TagNum1.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esd1TagNum1Content1.blur(function () {
$(this).unbind("keydown.keydown_s1");
});

_EsdDynamicTransformationScript.esd1TagNum1ContentN.focus(function () {
$(this).bind("keydown.keydown_e1", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd1TagNum2.mouseover();
_EsdDynamicTransformationScript.esd1TagNum2.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd1TagNum1ContentN.blur(function () {
$(this).unbind("keydown.keydown_e1");
});

//第二块
_EsdDynamicTransformationScript.esd1TagNum2.focus(function (e) {
$(this).bind("keydown.keydown_2", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esd1TagNum1.mouseover();
_EsdDynamicTransformationScript.esd1TagNum1ContentN.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd1TagNum2Content1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd1TagNum2.blur(function () {
$(this).unbind("keydown.keydown_2");
});

_EsdDynamicTransformationScript.esd1TagNum2Content1.focus(function () {
$(this).bind("keydown.keydown_s2", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esd1TagNum2.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esd1TagNum2Content1.blur(function () {
$(this).unbind("keydown.keydown_s2");
});

_EsdDynamicTransformationScript.esd1TagNum2ContentN.focus(function () {
$(this).bind("keydown.keydown_e2", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd1TagNum3.mouseover();
_EsdDynamicTransformationScript.esd1TagNum3.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd1TagNum2ContentN.blur(function () {
$(this).unbind("keydown.keydown_e2");
});

//第三块
_EsdDynamicTransformationScript.esd1TagNum3.focus(function (e) {
$(this).bind("keydown.keydown_3", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esd1TagNum2.mouseover();
_EsdDynamicTransformationScript.esd1TagNum2ContentN.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd1TagNum3Content1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd1TagNum3.blur(function () {
$(this).unbind("keydown.keydown_3");
});

_EsdDynamicTransformationScript.esd1TagNum3Content1.focus(function () {
$(this).bind("keydown.keydown_s3", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esd1TagNum3.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esd1TagNum3Content1.blur(function () {
$(this).unbind("keydown.keydown_s3");
});


}




var part_Third = function(){

// 将iframe所包含的a链接数 第一个a元素 最后一个a元素赋值给第一个参数的js对象
_EsdDynamicTransformationScript.getIframeInfos = function(jsObj,iframeObj){
if(iframeObj != undefined){
jsObj.aLink_num = iframeObj.contentWindow.document.getElementsByTagName("a").length;
jsObj.first_aLink = iframeObj.contentWindow.document.getElementsByTagName("a")[0];
jsObj.last_aLink = iframeObj.contentWindow.document.getElementsByTagName("a")[jsObj.aLink_num-1];
jsObj.self = iframeObj;
}
};

// 声明iframe操作对象
_EsdDynamicTransformationScript.iframe1 = {};
_EsdDynamicTransformationScript.iframe2 = {};

//通过方法赋值
_EsdDynamicTransformationScript.iframeElement1 = document.getElementsByTagName("iframe")[0];   // 需要修改 这里的iframe获取
_EsdDynamicTransformationScript.iframeElement2 = document.getElementsByTagName("iframe")[1];   // 需要修改 这里的iframe获取

//选项卡标签 jquery对象
_EsdDynamicTransformationScript.iframeTab1 = $(".slideTxtBox2 .hd ul li:eq(0) a");  // 需要修改 这里的tab获取
_EsdDynamicTransformationScript.iframeTab2 = $(".slideTxtBox2 .hd ul li:eq(1) a");  // 需要修改 这里的tab获取

//通过方法赋值
_EsdDynamicTransformationScript.getIframeInfos(_EsdDynamicTransformationScript.iframe1,_EsdDynamicTransformationScript.iframeElement1);
_EsdDynamicTransformationScript.getIframeInfos(_EsdDynamicTransformationScript.iframe2,_EsdDynamicTransformationScript.iframeElement2);

//第一个标签 切换
_EsdDynamicTransformationScript.iframeTab1.focus(function (e) {
e = $(this).mouseover();
$(this).bind("keydown.iframeKeydown_1", function (e) {
if (e.shiftKey && e.keyCode == 9) {

} else if (e.keyCode == 9) {
$(_EsdDynamicTransformationScript.iframe1.self).focus();
return false;
}
});
});
_EsdDynamicTransformationScript.iframeTab1.blur(function () {
$(this).unbind("keydown.iframeKeydown_1");
});

// 第一个标签的第一个链接
$(_EsdDynamicTransformationScript.iframe1.first_aLink).focus(function () {
$(this).bind("keydown.iframeKeydown_first1", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab1.focus();
return false;
} else if (e.keyCode == 9) {

}
});
});
$(_EsdDynamicTransformationScript.iframe1.first_aLink).blur(function () {
$(this).unbind("keydown.iframeKeydown_first1");
});

// 第一个标签的最后一个链接
$(_EsdDynamicTransformationScript.iframe1.last_aLink).focus(function () {
$(this).bind("keydown.iframeKeydown_first1", function (e) {
if (e.shiftKey && e.keyCode == 9) {

} else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab2.mouseover();
_EsdDynamicTransformationScript.iframeTab2.focus();
return false;
}
});
});
$(_EsdDynamicTransformationScript.iframe1.last_aLink).blur(function () {
$(this).unbind("keydown.iframeKeydown_first1");
});


//第二个标签切换
_EsdDynamicTransformationScript.iframeTab2.focus(function (e) {
$(this).bind("keydown.iframeKeydown_2", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab1.mouseover();
$(_EsdDynamicTransformationScript.iframe1.last_aLink).focus();
return false;
} else if (e.keyCode == 9) {
$(_EsdDynamicTransformationScript.iframe2.self).focus();
return false;
}
});
});
_EsdDynamicTransformationScript.iframeTab2.blur(function () {
$(this).unbind("keydown.iframeKeydown_2");
});

// 第二个标签的第一个链接
$(_EsdDynamicTransformationScript.iframe2.first_aLink).focus(function () {
$(this).bind("keydown.iframeKeydown_first2", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab2.focus();
return false;
} else if (e.keyCode == 9) {

}
});
});
$(_EsdDynamicTransformationScript.iframe2.first_aLink).blur(function () {
$(this).unbind("keydown.iframeKeydown_first2");
});


// 第二个标签的最后一个链接
$(_EsdDynamicTransformationScript.iframe2.last_aLink).focus(function () {
$(this).bind("keydown.iframeKeydown_last2", function (e) {
if (e.shiftKey && e.keyCode == 9) {

} else if (e.keyCode == 9) {

}
});
});
$(_EsdDynamicTransformationScript.iframe2.last_aLink).blur(function () {
$(this).unbind("keydown.iframeKeydown_last2");
});


}



var part_Forth = function(){

//各个选项名称
_EsdDynamicTransformationScript.esd2TagNum1 = $(".slideTxtBox3 .hd ul a:eq(0)");
_EsdDynamicTransformationScript.esd2TagNum2 = $(".slideTxtBox3 .hd ul a:eq(1)");
_EsdDynamicTransformationScript.esd2TagNum3 = $(".slideTxtBox3 .hd ul a:eq(2)");
_EsdDynamicTransformationScript.esd2TagNum4 = $(".slideTxtBox3 .hd ul a:eq(3)");

//各个选项中的第一个内容
_EsdDynamicTransformationScript.esd2TagNum1Content1 = $(".slideTxtBox3 .bd > ul:eq(0) a:first");
_EsdDynamicTransformationScript.esd2TagNum2Content1 = $(".slideTxtBox3 .bd > ul:eq(1) a:first");
_EsdDynamicTransformationScript.esd2TagNum3Content1 = $(".slideTxtBox3 .bd > ul:eq(2) a:first");
_EsdDynamicTransformationScript.esd2TagNum4Content1 = $(".slideTxtBox3 .bd > ul:eq(3) a:first");

//各个选项中的最后一个内容
_EsdDynamicTransformationScript.esd2TagNum1ContentN = $(".slideTxtBox3 .bd > ul:eq(0) a:last");
_EsdDynamicTransformationScript.esd2TagNum2ContentN = $(".slideTxtBox3 .bd > ul:eq(1) a:last");
_EsdDynamicTransformationScript.esd2TagNum3ContentN = $(".slideTxtBox3 .bd > ul:eq(2) a:last");
_EsdDynamicTransformationScript.esd2TagNum4ContentN = $(".slideTxtBox3 .bd > ul:eq(3) a:last");

//第一块
_EsdDynamicTransformationScript.esd2TagNum1.focus(function (e) {
$(this).bind("keydown.keydown_1", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum1Content1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd2TagNum1.blur(function () {
$(this).unbind("keydown.keydown_1");
});

_EsdDynamicTransformationScript.esd2TagNum1Content1.focus(function () {
$(this).bind("keydown.keydown_s1", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum1.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esd2TagNum1Content1.blur(function () {
$(this).unbind("keydown.keydown_s1");
});

_EsdDynamicTransformationScript.esd2TagNum1ContentN.focus(function () {
$(this).bind("keydown.keydown_e1", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum2.mouseover();
_EsdDynamicTransformationScript.esd2TagNum2.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd2TagNum1ContentN.blur(function () {
$(this).unbind("keydown.keydown_e1");
});

//第二块
_EsdDynamicTransformationScript.esd2TagNum2.focus(function (e) {
$(this).bind("keydown.keydown_2", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esd2TagNum1.mouseover();
_EsdDynamicTransformationScript.esd2TagNum1ContentN.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum2Content1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd2TagNum2.blur(function () {
$(this).unbind("keydown.keydown_2");
});

_EsdDynamicTransformationScript.esd2TagNum2Content1.focus(function () {
$(this).bind("keydown.keydown_s2", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum2.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esd2TagNum2Content1.blur(function () {
$(this).unbind("keydown.keydown_s2");
});

_EsdDynamicTransformationScript.esd2TagNum2ContentN.focus(function () {
$(this).bind("keydown.keydown_e2", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum3.mouseover();
_EsdDynamicTransformationScript.esd2TagNum3.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd2TagNum2ContentN.blur(function () {
$(this).unbind("keydown.keydown_e2");
});

//第三块
_EsdDynamicTransformationScript.esd2TagNum3.focus(function (e) {
$(this).bind("keydown.keydown_3", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esd2TagNum2.mouseover();
_EsdDynamicTransformationScript.esd2TagNum2ContentN.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum3Content1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd2TagNum3.blur(function () {
$(this).unbind("keydown.keydown_3");
});

_EsdDynamicTransformationScript.esd2TagNum3Content1.focus(function () {
$(this).bind("keydown.keydown_s3", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum3.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esd2TagNum3Content1.blur(function () {
$(this).unbind("keydown.keydown_s3");
});

_EsdDynamicTransformationScript.esd2TagNum3ContentN.focus(function () {
$(this).bind("keydown.keydown_e3", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum4.mouseover();
_EsdDynamicTransformationScript.esd2TagNum4.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd2TagNum3ContentN.blur(function () {
$(this).unbind("keydown.keydown_e3");
});

//第四块
_EsdDynamicTransformationScript.esd2TagNum4.focus(function (e) {
$(this).bind("keydown.keydown_4", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esd2TagNum3.mouseover();
_EsdDynamicTransformationScript.esd2TagNum3ContentN.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum4Content1.focus();
return false;
}
});
});
_EsdDynamicTransformationScript.esd2TagNum4.blur(function () {
$(this).unbind("keydown.keydown_4");
});

_EsdDynamicTransformationScript.esd2TagNum4Content1.focus(function () {
$(this).bind("keydown.keydown_s4", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.esd2TagNum4.focus();
return false;
}else if (e.keyCode == 9) {

}
});
});
_EsdDynamicTransformationScript.esd2TagNum4Content1.blur(function () {
$(this).unbind("keydown.keydown_s4");
});

}











}
/**
* 共通底部处理
*/

$("#jumpMenu1").attr("title","国家和各能源局网站");
$("#jumpMenu2").attr("title","省政府和直属部门网站");
$("#jumpMenu3").attr("title","能源相关网站");

_EsdDynamicTransformationScript.navBlock.selector.top = ".topbox";
_EsdDynamicTransformationScript.navBlock.selector.nav = ".nav";
_EsdDynamicTransformationScript.navBlock.selector.footer = ".footer";

if(window.location.href == 'http://dfz.jl.gov.cn/' || window.location.href =='http://dfz.jl.gov.cn/index.html'){

_EsdDynamicTransformationScript.navBlock.selector.main = ".shadowbox:eq(0)";
_EsdDynamicTransformationScript.navBlock.selector.left = "";
_EsdDynamicTransformationScript.navBlock.selector.right = "";
_EsdDynamicTransformationScript.navBlock.selector.content = "";

$(".shadowbox").addClass("navBlock");
$("#slideBox").addClass("navBlock");
$(".dt").addClass("navBlock");

_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; //激活的采用class因为会激活多个
}

if(window.location.href == 'http://dfz.jl.gov.cn/hdjl/'){
_EsdDynamicTransformationScript.navBlock.selector.left = ".hdjl_l";
_EsdDynamicTransformationScript.navBlock.selector.right = ".hdjl_r";

$(".hdjl_l").addClass("navBlock");
$(".hdjl_r").addClass("navBlock");
}


//面包屑导航（除首页）
if( $(".CurrChnlCls").length > 0 ){
//目录页的翻页input处理
$("#num").attr("title","跳转到第多少页");
$("#num").attr("placeholder","跳转到第多少页");
$(".zt10 input[type='submit']").attr("title","提交");
$(".zt10 input[type='submit']").attr("placeholder","提交");

_EsdDynamicTransformationScript.navBlock.selector.main = ".main";
_EsdDynamicTransformationScript.navBlock.selector.content = ".main";

$(".position").addClass("navBlock");
$(".main").addClass("navBlock");

_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; //激活的采用class因为会激活多个
}






/**
* 区域导航、调试开关
*/

$(document).bind("keydown.keydown_9001", function(e) {
if (e.shiftKey && e.keyCode == 20) {
$("*").focus(function() {
$(this).css({
"outline" : "2px dashed red"
});
});
$("*").blur(function() {
$(this).css({
"outline" : "0px black"
});
});
}
});

_EsdDynamicTransformationScript.navBlock.debug = true; // 是否是调试模式，调试模式有红边线，非调试模式关闭红边框
_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; // 激活的采用class因为会激活多个
// 快捷键定义区
//_EsdDynamicTransformationScript.navBlock.key = {};

//_EsdDynamicTransformationScript.navBlock.key.top = "alt+1"; // (top)
//_EsdDynamicTransformationScript.navBlock.key.nav = "alt+2"; // (nav)
//_EsdDynamicTransformationScript.navBlock.key.main = "alt+3"; // (main)
//_EsdDynamicTransformationScript.navBlock.key.content = "alt+4"; // (content)
//_EsdDynamicTransformationScript.navBlock.key.left = "alt+5"; // (left)
//_EsdDynamicTransformationScript.navBlock.key.right = "alt+6"; // (right)
//_EsdDynamicTransformationScript.navBlock.key.footer = "alt+7"; // (footer)
//_EsdDynamicTransformationScript.navBlock.key.down = "alt+8"; // (down)
//_EsdDynamicTransformationScript.navBlock.key.up = "alt+9"; // (up);

// 以下变量主要用于区块跳转
_EsdDynamicTransformationScript.navBlock.sIndex = -1; // 当前栏目下标
_EsdDynamicTransformationScript.navBlock.maxIndex = -1; // 保存目前所有class="navBlock"的区域块总数量，栏目总量下标。
_EsdDynamicTransformationScript.navBlock.minIndex = 0; // 栏目数量起始下标

// 主要代码区域

// 导航跳转
_EsdDynamicTransformationScript.navBlock.keyShowSelect = function(i) {
$(_EsdDynamicTransformationScript.navBlock.selector.activate).each(function(index, el) {
if (i == index) {
_EsdDynamicTransformationScript.navBlock.debugView(el);
$(el).find("a").each(function(i, e) {
if (i == 0) {
$(e).focus();
}
});

}
});
}

// 获取所有class=navBlock的区域的总数量，初始化轮训所有需要跳转的块
$(_EsdDynamicTransformationScript.navBlock.selector.activate).each(function(index, ehx) {
_EsdDynamicTransformationScript.navBlock.maxIndex++;
});



// 快捷键功能区域
// 跳转到头部alt+1(49)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 49) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.top);
}

});
// 跳转到导航alt+2(50)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 50) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.nav);
}

});
// 跳转到主要区域alt+3(51)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 51) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.main);
}
});

// 跳转到正文区域alt+4(52)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 52) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.content);
}
});

// 跳转到左区域alt+5(53)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 53) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.left);
}
});

// 跳转到右区域alt+6(54)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 54) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.right);
}
});
// 跳转到底部alt+7(55)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 55) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.footer);
}
});
//前进alt+8(56)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 56) {
if (_EsdDynamicTransformationScript.navBlock.sIndex < _EsdDynamicTransformationScript.navBlock.maxIndex) {
_EsdDynamicTransformationScript.navBlock.sIndex++;
_EsdDynamicTransformationScript.navBlock.keyShowSelect(_EsdDynamicTransformationScript.navBlock.sIndex);
}
}
});

// 后退alt+9(57)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 57) {
if (_EsdDynamicTransformationScript.navBlock.sIndex > _EsdDynamicTransformationScript.navBlock.minIndex) {
_EsdDynamicTransformationScript.navBlock.sIndex--;
_EsdDynamicTransformationScript.navBlock.keyShowSelect(_EsdDynamicTransformationScript.navBlock.sIndex);
}
}
});
// 特定区域跳转
_EsdDynamicTransformationScript.navBlock.keySelectScroll = function(id) {
if ($(id).length > 0) {
_EsdDynamicTransformationScript.navBlock.appendIns(id,true);//插入ins
_EsdDynamicTransformationScript.navBlock.debugView(id);
$(id).find("a").each(function(index) {
if (index == 0) {
$(this).focus();
}
});
_EsdDynamicTransformationScript.navBlock.appendIns(id,false);//清楚ins
} else {
}

}
//为了解决漂浮高等于0的情况下区域显示是一条线
_EsdDynamicTransformationScript.navBlock.appendIns=function(id,b){
if(b==true){
$(id).append("<ins id='esdNavBlockIns' style='clear: both;display: block;'></ins>")
}else{
$("#esdNavBlockIns").remove();
}
}

if (_EsdDynamicTransformationScript.navBlock.debug == true) {
// 如果开启调试模式，添加调试绘制矩形边线
$("body").append("<div id='show_top' class='lineshow'></div>");
$("body").append("<div id='show_bottom' class='lineshow'></div>");
$("body").append("<div id='show_left' class='lineshow'></div>");
$("body").append("<div id='show_right' class='lineshow'></div>");
$(".lineshow").css({
"display" : "none"
});
}
// 开启调试模式后会显示红边
_EsdDynamicTransformationScript.navBlock.debugView = function(e) {
if (_EsdDynamicTransformationScript.navBlock.debug == true) {
var x = $(e).offset();
//var w = parseInt($(e).css("width"));
var w = $(e).outerWidth();//返回元素的宽度（包含 padding 和 border）
//var h = parseInt($(e).css("height"));
var h = $(e).outerHeight();//返回元素的高度（包含 padding 和 border）
$("#show_top").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left,
"width" : w,
"height" : "0px"
});
$("#show_bottom").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top + h,
"left" : x.left,
"width" : w,
"height" : "0px"
});
$("#show_left").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left,
"width" : "0px",
"height" : h
});
$("#show_right").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left + w,
"width" : "0px",
"height" : h
});
$("html,body").animate({
scrollTop : $("#show_top").offset().top
}, 200);
$(".lineshow").css({
"display" : "block"
});
}
}
};
/**
* 主入口方法
*/

if (window.jQuery == undefined) {
var wzaInitInterval = setInterval(function(){
if(document.body!=null){
clearInterval(wzaInitInterval);
var _EsdDynamicTransformationInit = function(){
var esdJquery = document.createElement("script");
esdJquery.setAttribute("type", "text/javascript");
esdJquery.setAttribute("src", window.location.protocol + "//" + window.location.href.split("/")[2] + "/wza/bwscript/jquery-1.12.4.min.js");
esdJquery.setAttribute("charset", "utf-8");
esdJquery.setAttribute("id", "ESDWebAppInnerIframe");
document.body.appendChild(esdJquery);
var jqueryLoadInterval = setInterval(function () {
if (window.jQuery != undefined) {
clearInterval(jqueryLoadInterval);
//						setTimeout( _EsdDynamicTransformationFunction(jQuery) , 1000 );
_EsdDynamicTransformationFunction(jQuery)
}
}, 500);
};
//使用事件监听加载onload代码
if (typeof window.addEventListener != "undefined") {
window.addEventListener("load",_EsdDynamicTransformationInit,false);
} else {
window.attachEvent("onload",_EsdDynamicTransformationInit);
}
}
}, 10);
} else {
jQuery(function(){
//		setTimeout( _EsdDynamicTransformationFunction(jQuery) , 1000 );
_EsdDynamicTransformationFunction(jQuery)
})
}
